package date1129.method;

import java.sql.SQLException;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.lu.jdog.util.Resource;

import dog.bean.Wufu;

/**
 * @author Yue
 * @date 2017年11月28日 下午5:58:45 
 */
public class SpringTest {

	private static AbstractApplicationContext applicationContext;
	public static void main(String[] args) throws SQLException {
		applicationContext = new ClassPathXmlApplicationContext(Resource.getAssertPath(SpringTest.class,"beans.xml"));
		Wufu daxia = applicationContext.getBean("wf",Wufu.class);
		//由于每次调用都生成新的bean，故bean的哈希码是不一样的。
		daxia.play();
		System.out.println(daxia.toString());
	}

}
